/**
 * 
 */
package ru.opedge.notifical.notification;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

/**
 * @author opedge
 * 
 */
public class Notification
{
	private String text;

	private Date date;

	/**
	 * @return the date
	 */
	public Date getDate()
	{
		return date;
	}

	/**
	 * @param date
	 *            the date to set
	 */
	public void setDate(final Date date)
	{
		this.date = date;
	}

	/**
	 * @return the text
	 */

	public Notification(final String text, final int delay)
	{
		this.text = text;
		final Calendar cal = new GregorianCalendar();
		cal.set(Calendar.SECOND, cal.get(Calendar.SECOND) + delay);
		date = cal.getTime();
	}

	public Notification(final String text, final Date date)
	{
		this.text = text;
		this.date = date;
	}

	public Notification(final Notification notification)
	{
		date = notification.date;
		text = notification.text;
	}

	public String getText()
	{
		return text;
	}

	/**
	 * @param text
	 *            the text to set
	 */
	public void setText(final String text)
	{
		this.text = text;
	}

}
